import newRequest from '@/utils/newRequest'
import request from '@/utils/request'
import { mergeParams } from '@/utils'

export function noticeDetail(params) {
  return request({
    url: '/api/v1/notice/info',
    method: 'get',
    params
  })
}

export function noticeList(params) {
  return request({
    url: '/api/v1/notice',
    method: 'get',
    params
  })
}

export function newNoticeList(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/tSysMessage/doQueryPage',
    method: 'post',
    data
  })
}


export function readNotice(data) {
  return request({
    url: '/api/v1/notice/read',
    method: 'post',
    data
  })
}

export function newReadNotice(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/tSysMessage/doRead',
    method: 'post',
    data
  })
}
